/*
* @Author: Administrator
* @Date:   2017-09-01 23:26:20
* @Last Modified by:   tomystery
* @Last Modified time: 2017-09-10 16:13:10
*/
'use strict';
require('./index.css');
require('page/common/nav/index.js');
require('page/common/header/index.js');
var _mm=require('util/mm.js');
require('util/slider/index.js');
var templateBanner=require('./index.string');

$(function() {
	// 渲染banner的html
	var bannerHtml=_mm.renderHtml(templateBanner);
	$('.banner-con').html(bannerHtml);
	// 初始化banner
   var $slider=$('.banner').unslider({              
	dots: true,          
    });
    // 前一章和后一章事件绑定
    $('.banner-con .banner-arrow').click(function(){
    	var forward=$(this).hasClass('prev')?'prev':'next';
    	$slider.data('unslider')[forward]();

    })
});